package com.zhhtech.zhh.common

import android.text.TextPaint
import android.text.style.ClickableSpan
import android.view.View
import java.lang.ref.WeakReference

const val ACTION_REQUEST = "ACTION_REQUEST"
const val ACTION_LOGOUT = "ACTION_LOGOUT"
const val NEED_LOGIN = "needLogin"
const val MENU_GROUP_USE = "COMMON_USE"
const val MAX_MENU_SEARCH = 9
const val ACTION_REFRESH_MENU = "ACTION_REFRESH_MENU"
const val ACTION_USE_MENU = "ACTION_USE_MENU"
const val WX_APP_ID = "wx60eef99fc6878f3c"

const val PRIVACY_POLICY = "http://api.suishihuan.cn/privacy.html"
const val AGREEMENT = "http://api.suishihuan.cn/argee.html"
const val ABOUT = "http://api.suishihuan.cn//my.html"
const val AUTH_SECRET = "BurI5IzxJyYaI6nuQxJ5LlkDpf8UXhjjLIRsviq1UfHcPKLWvDFq7Xssd/CbAEtyoe8pBh4TeNOW+nGSGhoenfpnFejKxZ2o+WzRTC2FKeqeotQp9sG3gIWE37imkXZ3UfIvjCX2HptstYPZorlcPLbzrlv23z1uOsr+jljTTuhLTreaLMkqDpsYQK3fKVgHgYbFyObzPweRnnQrL4vHfSxqAs65fvrN9+8MRhUgdiDd1iLol4FTyMKnLSOyJNdhc0EVZrW5QemPdbg/aQemuCHBWXDBky3763Ra4yo7Yu8="

class ClickableEvent(
    back: View.OnClickListener?,
) : ClickableSpan() {
    private var backRef = WeakReference<View.OnClickListener>(back)

    override fun onClick(widget: View) {
        backRef.get()?.onClick(widget)
    }

    override fun updateDrawState(ds: TextPaint) {
        super.updateDrawState(ds)
        ds.isUnderlineText = false
    }
}